package com.example.run_game;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Instructions extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_instructions); 
        
        //Set up button listeners here
		Button menuButton = (Button)findViewById(R.id.menuButton);
		menuButton.setOnClickListener(checkMainMenuPress);
		
		//Set text for instructions
		String instructions = "";
		instructions += "Run Master allows players to go on runs, tracks their movements" +
		" and presents them with statistical breakdowns and historical data over time. "+ 
		"Run Master is a game that you play by running! " +
		"\n\n\nBegin by setting up your profile. Ensure your weight and height are correct as " +
		"this will help detirmine how many calories you are burning whilst exercising!\n\n\n" +
		"Start a new run and select the type of goal you want to aim for: either time or distance.\n" + 
		"On the next screen you will be presented with a few optional objectives to complete while you run.\n "+ 
		"Now simply listen to the voice over and head off! "+
		"\n\n"+
		"Details:\n"+
		"You gain 1xp per meter you run, but bonuses and running against the wind will boost this!\n"+
		"Reaching level 2 takes 1000xp. Level 3, 2000xp and so on.\n"+
		"Completing the sub objectives will net you more xp.\n"+
		"Run to a suggested checkpoint to get a bonus.\n"+
		"Following the checkpoints will mean you do not have a much shorter or longer jog than you intended.\n"+
		"Completing a run will save it to your run history where you can view it later.";

		TextView instructionsText = (TextView)findViewById(R.id.instructions_text);
		instructionsText.setText(instructions);		
    }
 
    private OnClickListener checkMainMenuPress = new OnClickListener() 
    {
		public void onClick(View v) 
		{
			Intent intent = new Intent(getBaseContext(), MainMenu.class);
			startActivity(intent);
		}
    };
    
}
